package com.sy.controller;

import com.sy.common.bean.ResultBean;
import com.sy.common.controller.BaseController;
import com.sy.mapper.GoodsCategoryMapper;
import com.sy.service.GoodsCategoryService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "商品类别")
@RestController
@RequestMapping("/api/set/goods")
public class GoodsCategoryController extends BaseController {
    @Autowired
    GoodsCategoryService goodsCategoryService;
    @GetMapping("/category/tree")
    public ResultBean tree(){
        List list = goodsCategoryService.tree();
        return success("商品类别树",list);
    }
}
